package tmt.usercenter.web.domain.enums;

import com.tmt.annotation.EnumDescriptor;
import com.tmt.annotation.parser.EnumAnnotationParser;

/**
 * 系统内权限类型
 * Created by Stark on 2017/3/10.
 */
public enum AuthorityType {

	@EnumDescriptor(title="系统通用", description = "通用权限，不可删除")
	COMMON,

	@EnumDescriptor(title="系统专用", description = "系统权限，不可删除")
	SYSTEM,

	@EnumDescriptor(title="客户专用", description = "自定义权限，可删除")
	CUSTOM,

	@EnumDescriptor(title="客户系统专用", description = "客户系统权限，不可删除")
	CLIENT_SYSTEM;

	public static AuthorityType from(String title) {
		return EnumAnnotationParser.convertFromTitle(AuthorityType.class, title);
	}
}
